/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dbf;

/**
 *
 * @author rosi
 */
public class StringUtils {
    public static String rightPad(String str, int size, char padChar) {
        // returns original string when possible
        if (str.length() >= size) return str;

        StringBuilder sb = new StringBuilder(size + 1).append(str);
        while (sb.length() < size) {
            sb.append(padChar);
        }
        return sb.toString();
    }
}
